from distutils.core import setup
from os.path import dirname, join
import sys

import py2exe

rootPythonDir = dirname(sys.executable)
webDriversPath = join(rootPythonDir, 'Lib\\site-packages\\selenium\\webdriver\\firefox')
webServersPath = join(rootPythonDir, "Scripts")

dataFiles = [('selenium/webdriver/firefox', [join(webDriversPath, 'webdriver.xpi'),
                                             join(webDriversPath, 'webdriver_prefs.json')]),
             ('', [join(webServersPath, 'chromedriver.exe'),
                   join(webServersPath, 'IEDriverServer.exe')])]

setup(
    name='Web Tests',
    version='1.0',
    description='tests for air backup',
    author='TestFarm',
    author_email='testfarm@iaso.com',
    console=['AirBackupRunner.py'],
    data_files=dataFiles,
    options={
        'py2exe':
            {
                'skip_archive': True,
                'optimize': 2
            }
    }
)

